# 作者： 李泉志
# 2025年01月04日18时44分秒
# 2947029073@qq.com
def use_while1():
    i = 1
    while i <= 5:
        # 要重复执行的代码
        print("Hello Python")
        # 处理计数器 i
        i = i + 1
    # print("循环结束后的 i = %d20" % i)
    print(f'循环结束，i的值{i}')


def use_continue():
    i = 0
    result = 0
    while i <= 100:
        if i % 2 == 0:
            i += 1
            continue
        result += i
        i += 1
    print(result)


def use_break():
    i = 0
    result = 0
    while i <= 100:
        if result > 2000:
            break
        result += i
        i += 1
    print(f'0~100数字求和结果 = {result} i = {i}')


# use_while1()
# use_continue()
use_break()